package com.code.day18;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

public class Demo05Comparator {
    public static void main(String[] args) {
        ArrayList<Person> list = new ArrayList<>();
        list.add(new Person("jack", 12));
        list.add(new Person("tom", 10));
        list.add(new Person("rose", 15));

//        Collections.sort(list);
        System.out.println(list);
    }
}
